import Vue from 'vue'
import Router from 'vue-router'

import Layout from "../page/common/Layout.vue"
import indexNotice from "../page/web/notice/indexNotice"
import top from "../page/web/notice/top"
import leftMenu from "../page/web/notice/leftMenu"
import inbox from "../page/web/notice/inbox"
import details from "../page/web/notice/details"
import outbox from "../page/web/notice/outbox"
import newNotice from "../page/web/notice/newNotice.vue"
import noRight from "../page/web/notice/noRight.vue"
Vue.use(Router)

export default new Router({
  linkActiveClass: 'on',
  // mode:'history',
  routes: [{
      path: '/',
      name: 'Layout',
      component: Layout,
      redirect: {
        name: 'indexNotice'
      },
    },
    {
      path: '/indexNotice',
      name: 'indexNotice',
      component: indexNotice,
      redirect: '/indexNotice/inbox',
      children: [{
          path: 'top',
          name: 'top',
          component: top
        }, {
          path: 'leftMenu',
          name: 'leftMenu',
          component: leftMenu
        }, {
          path: 'inbox',
          name: 'inbox',
          component: inbox,
          children: [{
            path: 'inboxdetails/:year/:type',
            name: 'inboxdetails',
            component: details,
            props: true,
          }]
        },{
          path: 'outbox',
          name: 'outbox',
          component: outbox,
          children: [{
            path: 'newNotice',
            name: 'newNotice',
            component: newNotice
          }, {
            path: 'outboxdetails/:year/:type',
            name: 'outboxdetails',
            component: details,
            props: true,
          }, ]
        },{
          path:'planWatch',
          name:'planWatch',
          component:resolve => require(['../page/web/notice/planWatch'],resolve)
        },{
          path:'playSet',
          name:'playSet',
          component:resolve => require(['../page/web/notice/planSet'],resolve)
        }

      ]
    },
    {
      path: '/noRight',
      name: 'noRight',
      component: noRight,
    }
  ]
})
